home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / t_os / tool / otohime / src / iottre.c < prev    next >
C/C++ Source or Header  |  1994-11-16  |  13KB  |  554 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <winb.h>
  4. #include <te.h>
  5. #include <fntb.h>
  6. #include <gui.h>
  7.  
  8. extern int    tremoDialogId ;
  9. extern int    tremoOkBtnId ;
  10. extern int    tremoOkchk() ;
  11. extern int    tremoPlayBtnId ;
  12. extern int    tremoPlay() ;
  13. extern int    tremoUndoBtnId ;
  14. extern int    tremoUndo() ;
  15. extern int    tremoInfBtnId ;
  16. extern int    tremoInf() ;
  17. extern int    tremoCanBtnId ;
  18. extern int    tremoCanchk() ;
  19. extern int    tremoMesId[18] ;
  20. extern int    tremoSubDialogId ;
  21. extern int    tremoMainMixVolumeId ;
  22. extern int    tremoMainMixSet() ;
  23. extern int    tremoMainMixNumId ;
  24. extern int    tremoTremoMixVolumeId ;
  25. extern int    tremoTremoMixSet() ;
  26. extern int    tremoTremoMixNumId ;
  27. extern int    tremoSpeedNumId ;
  28. extern int    tremoSpeedSet() ;
  29. extern int    tremoSpeedVolumeId ;
  30.  
  31. #define ALIGN    4
  32. #define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)
  33.  
  34. /*    MMI_init 用データ    */
  35.  
  36. /*    ヘッダ    */
  37.  
  38. MMIINIT    initDataIOTTRE = { "MmiInit",  31, 0 } ;
  39.  
  40. /* tremoDialogId */
  41.  
  42. static MMIPACKET d001 = {    &tremoDialogId,
  43.                             NULL,
  44.                             &MJ_DIALOGL40,
  45.                             OFFSET(DIALOGL40),
  46.                             MS_NONE
  47.                         } ;
  48. static DIALOGL40    d001d = {    MS_BTLEFTL40 | MS_EVMOSONL40,
  49.                               76, 109, 565, 372, 8, 4, 8,
  50.                             MS_SRECTL40 | MS_UFRAMEL40 | MS_FRAMEL40,
  51.                             NULL,   0,   0
  52.                         } ;
  53.  
  54. /* tremoOkBtnId */
  55.  
  56. static MMIPACKET d002 = {    &tremoOkBtnId,
  57.                             &tremoDialogId,
  58.                             &MJ_DBUTTONL40,
  59.                             OFFSET(DBUTTONL40),
  60.                             MS_NONE
  61.                         } ;
  62. static DBUTTONL40    d002d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  63.                               96, 341, 157, 364,12, 4, 8,
  64.                             MS_PANELL40 | MS_FRAMEL40,
  65.                             tremoOkchk,
  66.                             0x0000
  67.                         } ;
  68.  
  69. /* tremoPlayBtnId */
  70.  
  71. static MMIPACKET d003 = {    &tremoPlayBtnId,
  72.                             &tremoDialogId,
  73.                             &MJ_DBUTTONL40,
  74.                             OFFSET(DBUTTONL40),
  75.                             MS_NONE
  76.                         } ;
  77. static DBUTTONL40    d003d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  78.                              166, 341, 227, 364, 7, 4, 8,
  79.                             MS_PANELL40 | MS_FRAMEL40,
  80.                             tremoPlay,
  81.                             0x0000
  82.                         } ;
  83.  
  84. /* tremoUndoBtnId */
  85.  
  86. static MMIPACKET d004 = {    &tremoUndoBtnId,
  87.                             &tremoDialogId,
  88.                             &MJ_DBUTTONL40,
  89.                             OFFSET(DBUTTONL40),
  90.                             MS_NONE
  91.                         } ;
  92. static DBUTTONL40    d004d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  93.                              236, 341, 297, 364, 7, 4, 8,
  94.                             MS_PANELL40 | MS_FRAMEL40,
  95.                             tremoUndo,
  96.                             0x0000
  97.                         } ;
  98.  
  99. /* tremoInfBtnId */
  100.  
  101. static MMIPACKET d005 = {    &tremoInfBtnId,
  102.                             &tremoDialogId,
  103.                             &MJ_DBUTTONL40,
  104.                             OFFSET(DBUTTONL40),
  105.                             MS_NONE
  106.                         } ;
  107. static DBUTTONL40    d005d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  108.                              306, 341, 367, 364, 7, 4, 8,
  109.                             MS_PANELL40 | MS_FRAMEL40,
  110.                             tremoInf,
  111.                             0x0000
  112.                         } ;
  113.  
  114. /* tremoCanBtnId */
  115.  
  116. static MMIPACKET d006 = {    &tremoCanBtnId,
  117.                             &tremoDialogId,
  118.                             &MJ_DBUTTONL40,
  119.                             OFFSET(DBUTTONL40),
  120.                             MS_NONE
  121.                         } ;
  122. static DBUTTONL40    d006d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  123.                              483, 341, 544, 364,10, 4, 8,
  124.                             MS_PANELL40 | MS_FRAMEL40,
  125.                             tremoCanchk,
  126.                             0x0000
  127.                         } ;
  128.  
  129. /* tremoMesId[0] */
  130.  
  131. static MMIPACKET d007 = {    &tremoMesId[0],
  132.                             &tremoDialogId,
  133.                             &MJ_MSGL40,
  134.                             OFFSET(MSGL40),
  135.                             MS_NONE
  136.                         } ;
  137. static MSGL40    d007d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  138.                              105, 344, 148, 361, 8,15, 8,
  139.                             MS_NONEL40,
  140.                             "実  行",
  141.                                1,  12,  12,
  142.                             MS_NONEL40,
  143.                                0,   0
  144.                         } ;
  145.  
  146. /* tremoMesId[1] */
  147.  
  148. static MMIPACKET d008 = {    &tremoMesId[1],
  149.                             &tremoDialogId,
  150.                             &MJ_MSGL40,
  151.                             OFFSET(MSGL40),
  152.                             MS_NONE
  153.                         } ;
  154. static MSGL40    d008d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  155.                              174, 344, 220, 361, 8,15, 8,
  156.                             MS_NONEL40,
  157.                             "再  生",
  158.                                1,  12,  12,
  159.                             MS_NONEL40,
  160.                                0,   0
  161.                         } ;
  162.  
  163. /* tremoMesId[2] */
  164.  
  165. static MMIPACKET d009 = {    &tremoMesId[2],
  166.                             &tremoDialogId,
  167.                             &MJ_MSGL40,
  168.                             OFFSET(MSGL40),
  169.                             MS_NONE
  170.                         } ;
  171. static MSGL40    d009d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  172.                              242, 344, 293, 361, 8,15, 8,
  173.                             MS_NONEL40,
  174.                             "アンドゥ",
  175.                                1,  12,  12,
  176.                             MS_NONEL40,
  177.                                0,   0
  178.                         } ;
  179.  
  180. /* tremoMesId[3] */
  181.  
  182. static MMIPACKET d010 = {    &tremoMesId[3],
  183.                             &tremoDialogId,
  184.                             &MJ_MSGL40,
  185.                             OFFSET(MSGL40),
  186.                             MS_NONE
  187.                         } ;
  188. static MSGL40    d010d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  189.                              311, 344, 362, 361, 8,15, 8,
  190.                             MS_NONEL40,
  191.                             "情  報",
  192.                                1,  12,  12,
  193.                             MS_NONEL40,
  194.                                0,   0
  195.                         } ;
  196.  
  197. /* tremoMesId[4] */
  198.  
  199. static MMIPACKET d011 = {    &tremoMesId[4],
  200.                             &tremoDialogId,
  201.                             &MJ_MSGL40,
  202.                             OFFSET(MSGL40),
  203.                             MS_NONE
  204.                         } ;
  205. static MSGL40    d011d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  206.                              491, 344, 537, 361, 8,15, 8,
  207.                             MS_NONEL40,
  208.                             "取  消",
  209.                                1,  12,  12,
  210.                             MS_NONEL40,
  211.                                0,   0
  212.                         } ;
  213.  
  214. /* tremoMesId[5] */
  215.  
  216. static MMIPACKET d012 = {    &tremoMesId[5],
  217.                             &tremoDialogId,
  218.                             &MJ_MSGL40,
  219.                             OFFSET(MSGL40),
  220.                             MS_NONE
  221.                         } ;
  222. static MSGL40    d012d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  223.                               98, 112, 170, 130, 8,15, 8,
  224.                             MS_NONEL40,
  225.                             "トレモロ",
  226.                                1,  12,  12,
  227.                             MS_BOLDL40,
  228.                                0,   0
  229.                         } ;
  230.  
  231. /* tremoSubDialogId */
  232.  
  233. static MMIPACKET d013 = {    &tremoSubDialogId,
  234.                             &tremoDialogId,
  235.                             &MJ_DIALOGL40,
  236.                             OFFSET(DIALOGL40),
  237.                             MS_NONE
  238.                         } ;
  239. static DIALOGL40    d013d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40,
  240.                               96, 132, 544, 334, 8, 4, 8,
  241.                             MS_DFRAMEL40 | MS_FRAMEL40,
  242.                             NULL,   0,   0
  243.                         } ;
  244.  
  245. /* tremoMainMixVolumeId */
  246.  
  247. static MMIPACKET d014 = {    &tremoMainMixVolumeId,
  248.                             &tremoSubDialogId,
  249.                             &MJ_SCRLL40,
  250.                             OFFSET(SCRLL40),
  251.                             MS_NONE
  252.                         } ;
  253. static SCRLL40    d014d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_HORIL40,
  254.                              305, 172, 464, 187, 8, 4, 7,
  255.                             MS_PANELL40 | MS_FRAMEL40,
  256.                             tremoMainMixSet,
  257.                               20,   0, 100,   8,   8,
  258.                              265, 266
  259.                         } ;
  260.  
  261. /* tremoMainMixNumId */
  262.  
  263. static MMIPACKET d015 = {    &tremoMainMixNumId,
  264.                             &tremoSubDialogId,
  265.                             &MJ_NUMBOXL40,
  266.                             OFFSET(NUMBOXL40),
  267.                             MS_NONE
  268.                         } ;
  269. static NUMBOXL40    d015d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
  270.                              471, 168, 526, 191, 8, 4, 8,
  271.                             MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
  272.                             tremoMainMixSet,
  273.                                1,  12,  12,
  274.                             MS_NONEL40,
  275.                                0,   0,
  276.                               20,   0, 100,   1,   0,
  277.                              263, 264
  278.                         } ;
  279.  
  280. /* tremoTremoMixVolumeId */
  281.  
  282. static MMIPACKET d016 = {    &tremoTremoMixVolumeId,
  283.                             &tremoSubDialogId,
  284.                             &MJ_SCRLL40,
  285.                             OFFSET(SCRLL40),
  286.                             MS_NONE
  287.                         } ;
  288. static SCRLL40    d016d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_HORIL40,
  289.                              305, 207, 464, 222, 8, 4, 7,
  290.                             MS_PANELL40 | MS_FRAMEL40,
  291.                             tremoTremoMixSet,
  292.                              100,   0, 100,   8,   8,
  293.                              265, 266
  294.                         } ;
  295.  
  296. /* tremoTremoMixNumId */
  297.  
  298. static MMIPACKET d017 = {    &tremoTremoMixNumId,
  299.                             &tremoSubDialogId,
  300.                             &MJ_NUMBOXL40,
  301.                             OFFSET(NUMBOXL40),
  302.                             MS_NONE
  303.                         } ;
  304. static NUMBOXL40    d017d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
  305.                              471, 203, 526, 226, 8, 4, 8,
  306.                             MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
  307.                             tremoTremoMixSet,
  308.                                1,  12,  12,
  309.                             MS_NONEL40,
  310.                                0,   0,
  311.                              100,   0, 100,   1,   0,
  312.                              263, 264
  313.                         } ;
  314.  
  315. /* tremoSpeedNumId */
  316.  
  317. static MMIPACKET d018 = {    &tremoSpeedNumId,
  318.                             &tremoSubDialogId,
  319.                             &MJ_NUMBOXL40,
  320.                             OFFSET(NUMBOXL40),
  321.                             MS_NONE
  322.                         } ;
  323. static NUMBOXL40    d018d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
  324.                              471, 291, 526, 314, 8, 4, 8,
  325.                             MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
  326.                             tremoSpeedSet,
  327.                                1,  12,  12,
  328.                             MS_NONEL40,
  329.                                0,   0,
  330.                              150,   0, 500,   1,   1,
  331.                              263, 264
  332.                         } ;
  333.  
  334. /* tremoMesId[6] */
  335.  
  336. static MMIPACKET d019 = {    &tremoMesId[6],
  337.                             &tremoSubDialogId,
  338.                             &MJ_MSGL40,
  339.                             OFFSET(MSGL40),
  340.                             MS_NONE
  341.                         } ;
  342. static MSGL40    d019d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  343.                              326, 147, 443, 164, 0,15, 8,
  344.                             MS_NONEL40,
  345.                             "ミキシングレート",
  346.                                1,  12,  12,
  347.                             MS_BOLDL40,
  348.                                0,   0
  349.                         } ;
  350.  
  351. /* tremoMesId[7] */
  352.  
  353. static MMIPACKET d020 = {    &tremoMesId[7],
  354.                             &tremoSubDialogId,
  355.                             &MJ_MSGL40,
  356.                             OFFSET(MSGL40),
  357.                             MS_NONE
  358.                         } ;
  359. static MSGL40    d020d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  360.                              240, 173, 300, 188, 0,15, 8,
  361.                             MS_NONEL40,
  362.                             "オリジナル",
  363.                                1,  12,  12,
  364.                             MS_NONEL40,
  365.                                0,   0
  366.                         } ;
  367.  
  368. /* tremoMesId[8] */
  369.  
  370. static MMIPACKET d021 = {    &tremoMesId[8],
  371.                             &tremoSubDialogId,
  372.                             &MJ_MSGL40,
  373.                             OFFSET(MSGL40),
  374.                             MS_NONE
  375.                         } ;
  376. static MSGL40    d021d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  377.                              237, 206, 299, 223, 0,15, 8,
  378.                             MS_NONEL40,
  379.                             "トレモロ",
  380.                                1,  12,  12,
  381.                             MS_NONEL40,
  382.                                0,   0
  383.                         } ;
  384.  
  385. /* tremoMesId[9] */
  386.  
  387. static MMIPACKET d022 = {    &tremoMesId[9],
  388.                             &tremoSubDialogId,
  389.                             &MJ_MSGL40,
  390.                             OFFSET(MSGL40),
  391.                             MS_NONE
  392.                         } ;
  393. static MSGL40    d022d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  394.                              242, 245, 379, 261, 0,15, 8,
  395.                             MS_NONEL40,
  396.                             "トレモロ周波数(Hz)",
  397.                                1,  12,  12,
  398.                             MS_BOLDL40,
  399.                                0,   0
  400.                         } ;
  401.  
  402. /* tremoSpeedVolumeId */
  403.  
  404. static MMIPACKET d023 = {    &tremoSpeedVolumeId,
  405.                             &tremoSubDialogId,
  406.                             &MJ_SCRLL40,
  407.                             OFFSET(SCRLL40),
  408.                             MS_NONE
  409.                         } ;
  410. static SCRLL40    d023d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_HORIL40,
  411.                              117, 295, 464, 310, 8, 4, 7,
  412.                             MS_PANELL40 | MS_FRAMEL40,
  413.                             tremoSpeedSet,
  414.                               75,   0, 250,   1,   8,
  415.                              265, 266
  416.                         } ;
  417.  
  418. /* tremoMesId[10] */
  419.  
  420. static MMIPACKET d024 = {    &tremoMesId[10],
  421.                             &tremoSubDialogId,
  422.                             &MJ_MSGL40,
  423.                             OFFSET(MSGL40),
  424.                             MS_NONE
  425.                         } ;
  426. static MSGL40    d024d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  427.                              139, 279, 361, 296, 0,15, 8,
  428.                             MS_NONEL40,
  429.                             "|    |    |    |    |    |    |    |",
  430.                                1,  12,  12,
  431.                             MS_NONEL40,
  432.                                0,   0
  433.                         } ;
  434.  
  435. /* tremoMesId[11] */
  436.  
  437. static MMIPACKET d025 = {    &tremoMesId[11],
  438.                             &tremoSubDialogId,
  439.                             &MJ_MSGL40,
  440.                             OFFSET(MSGL40),
  441.                             MS_NONE
  442.                         } ;
  443. static MSGL40    d025d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  444.                              229, 279, 451, 296, 0,15, 8,
  445.                             MS_NONEL40,
  446.                             "|    |    |    |    |    |    |    |",
  447.                                1,  12,  12,
  448.                             MS_NONEL40,
  449.                                0,   0
  450.                         } ;
  451.  
  452. /* tremoMesId[12] */
  453.  
  454. static MMIPACKET d026 = {    &tremoMesId[12],
  455.                             &tremoSubDialogId,
  456.                             &MJ_MSGL40,
  457.                             OFFSET(MSGL40),
  458.                             MS_NONE
  459.                         } ;
  460. static MSGL40    d026d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  461.                              128, 265, 158, 280, 0,15, 8,
  462.                             MS_NONEL40,
  463.                             "0",
  464.                                1,  12,  12,
  465.                             MS_NONEL40,
  466.                                0,   0
  467.                         } ;
  468.  
  469. /* tremoMesId[13] */
  470.  
  471. static MMIPACKET d027 = {    &tremoMesId[13],
  472.                             &tremoSubDialogId,
  473.                             &MJ_MSGL40,
  474.                             OFFSET(MSGL40),
  475.                             MS_NONE
  476.                         } ;
  477. static MSGL40    d027d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  478.                              186, 265, 216, 280, 0,15, 8,
  479.                             MS_NONEL40,
  480.                             "10",
  481.                                1,  12,  12,
  482.                             MS_NONEL40,
  483.                                0,   0
  484.                         } ;
  485.  
  486. /* tremoMesId[14] */
  487.  
  488. static MMIPACKET d028 = {    &tremoMesId[14],
  489.                             &tremoSubDialogId,
  490.                             &MJ_MSGL40,
  491.                             OFFSET(MSGL40),
  492.                             MS_NONE
  493.                         } ;
  494. static MSGL40    d028d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  495.                              247, 265, 277, 280, 0,15, 8,
  496.                             MS_NONEL40,
  497.                             "20",
  498.                                1,  12,  12,
  499.                             MS_NONEL40,
  500.                                0,   0
  501.                         } ;
  502.  
  503. /* tremoMesId[15] */
  504.  
  505. static MMIPACKET d029 = {    &tremoMesId[15],
  506.                             &tremoSubDialogId,
  507.                             &MJ_MSGL40,
  508.                             OFFSET(MSGL40),
  509.                             MS_NONE
  510.                         } ;
  511. static MSGL40    d029d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  512.                              307, 265, 337, 280, 0,15, 8,
  513.                             MS_NONEL40,
  514.                             "30",
  515.                                1,  12,  12,
  516.                             MS_NONEL40,
  517.                                0,   0
  518.                         } ;
  519.  
  520. /* tremoMesId[16] */
  521.  
  522. static MMIPACKET d030 = {    &tremoMesId[16],
  523.                             &tremoSubDialogId,
  524.                             &MJ_MSGL40,
  525.                             OFFSET(MSGL40),
  526.                             MS_NONE
  527.                         } ;
  528. static MSGL40    d030d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  529.                              367, 265, 397, 280, 0,15, 8,
  530.                             MS_NONEL40,
  531.                             "40",
  532.                                1,  12,  12,
  533.                             MS_NONEL40,
  534.                                0,   0
  535.                         } ;
  536.  
  537. /* tremoMesId[17] */
  538.  
  539. static MMIPACKET d031 = {    &tremoMesId[17],
  540.                             &tremoSubDialogId,
  541.                             &MJ_MSGL40,
  542.                             OFFSET(MSGL40),
  543.                             MS_NONE
  544.                         } ;
  545. static MSGL40    d031d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  546.                              427, 265, 457, 280, 0,15, 8,
  547.                             MS_NONEL40,
  548.                             "50",
  549.                                1,  12,  12,
  550.                             MS_NONEL40,
  551.                                0,   0
  552.                         } ;
  553.  
  554.